package com.yenlien.traceyun.plant.entity;

import com.yenlien.traceyun.webase.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 * @Date 2023/8/1
 * @Author jiaLong
 * @Descript 设备报警信息
 */
@Data
@Entity
@Table(name = "dev_alarm")
//@Builder
public class DevAlarm extends BaseEntity implements Serializable {
    private static final long serialVersionUID = -5152963930027455032L;

    @ApiModelProperty(value = "报警标题", example = "空气温度高于最大值: 40.0")
    private String title;

    @ApiModelProperty(value = "种植地块名称", example = "红富士地")
    private String baseSoilName;

    @ApiModelProperty(value = "设备序列号", example = "866250060598764")
    private String devId;

    @ApiModelProperty(value = "报警类型(1=参数异常 和 2=离线报警)", example = "1")
    private String alarmType = "1";

    @ApiModelProperty(value = "设备名称", example = "气象监测站866250060598764")
    private String devName;

    @ApiModelProperty(value = "设备类型", example = "气象传感")
    private String devType;
    @ApiModelProperty(value = "报警参数名称", example = "风向")
    private String paramName;

    @ApiModelProperty(value = "报警值")
    private String val;

    @ApiModelProperty(value = "报警时间")
    private String createTime;

    @ApiModelProperty(value = "阈值")
    private String threshold;

    @ApiModelProperty(value = "所属企业ID", example = "2c9d0ded821a5f77018224eab3be0008")
    private String compId;

    @ApiModelProperty(value = "处理状态(1=未处理  2=已处理)", example = "1")
    private String handleState;

    @Transient
    @ApiModelProperty(value = "查询参数的起始时间", example = "2023-08-31 10:29:27")
    private String startTime;
    @Transient
    @ApiModelProperty(value = "查询参数的截止时间", example = "2023-08-31 09:29:27")
    private String endTime;

}
